#ifndef __EMB_TASK_H
#define __EMB_TASK_H

#include "emb.h"


enum
{
    EMB_TASK_ID_0,
};

typedef void (*emb_task_callback_fn_t)(emb_task_id_t Id,emb_event_t Event);
typedef uint8_t emb_task_id_t;

typedef struct 
{
    emb_task_callback_fn_t *Callback;
    emb_mem_ctrl_t EventMem[2];

    uint8_t TaskStatus : 1;
    uint8_t ActiveEventMem : 1;
} emb_task_ctrl_t;

extern emb_task_ctrl_t task_table[];
void emb_task_handler();
void emb_task_start(emb_task_id_t Id);
void emb_task_stop(emb_task_id_t Id);

void emb_idle_task();


#endif


